import random

L = []
n = 0


def F():
    c = 0
    for i in range(10):
        L.append(random.randint(0, 10))
    for j in range(10):
        if L.count(L[j]) >= 3:
            c = c + 1
            break
    L.clear()
    return c


for k in range(10000):
    if F() == 1:
        n = n + 1
print('相等列表数量有:', n, '个')
